<?php


$this->useClass('Uniform_Abstract');

class Uniform_Object extends Uniform_Abstract
{
	public function ctime ()
	{
		return RL_CyrDate::newFromStr("%Y-%m-%d %H:%i:%s", $this->what()->ctime);
	} // end of method ctime
	public function doctype ()
	{
		return substr($this->what()->type, 1);
	} // end of method getDoctype

	public function offsetGet ($k)
	{
		if (array_key_exists($k, $this->_cache)) return $this->_cache[$k];
		$mn = str_replace('_', '', $k);
		if (method_exists($this,$mn)) return $this->$mn();
		if (array_key_exists($k, $this->what()->data)) return $this->what()->data[$k];
		return NULL;
	} // end of method getOffset
	public function offsetExists ($k)
	{
		$mn = str_replace($k, '_', '');
		return method_exists($this,$mn) || array_key_exists($k, $this->_cache) || array_key_exists($k, $this->what()->data);
	} // end of method offsetExists
}

